<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>邮箱验证码</title>
    <style>
      body {
        font-family: "Segoe UI", Arial, sans-serif;
        line-height: 1.6;
        color: #333;
        max-width: 600px;
        margin: 0 auto;
        padding: 20px;
      }
      .container {
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        background-color: #f9f9f9;
        overflow: hidden;
      }
      .header {
        background-color: #1890ff;
        color: white;
        padding: 20px;
        text-align: center;
      }
      .content {
        background-color: white;
        padding: 20px;
      }
      .code-container {
        background-color: #f0f8ff;
        padding: 15px;
        text-align: center;
        margin: 20px 0;
        border-radius: 4px;
        border-left: 4px solid #1890ff;
      }
      .code {
        font-size: 28px;
        font-weight: bold;
        letter-spacing: 4px;
        color: #1890ff;
        font-family: "Courier New", monospace;
      }
      .warning {
        background-color: #fffbe6;
        padding: 15px;
        border-radius: 4px;
        margin-bottom: 20px;
        border-left: 4px solid #faad14;
      }
      .footer {
        text-align: center;
        margin-top: 30px;
        padding-top: 20px;
        border-top: 1px solid #eee;
        color: #999;
        font-size: 12px;
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div class="header">
        <h1 th:text="${companyName}">OJ编程平台</h1>
        <p>在线编程学习平台</p>
      </div>

      <div class="content">
        <h2>邮箱验证码</h2>
        <p>
          您好，您正在使用<span th:text="${companyName}">OJ编程平台</span
          >的邮箱验证功能，您的验证码是：
        </p>

        <div class="code-container">
          <span class="code" th:text="${code}">123456</span>
        </div>

        <p>
          验证码有效期为
          <strong th:text="${expireMinutes}">5</strong> 分钟，请尽快使用。
        </p>
      </div>

      <div class="warning">
        <p>
          <strong>安全提示：</strong
          >请勿将验证码泄露给他人。如非本人操作，请及时修改密码。
        </p>
      </div>

      <div class="footer">
        <p>此邮件由系统自动发送，请勿回复</p>
        <p
          th:text="'© ' + ${#dates.format(#dates.createNow(), 'yyyy')} + ' ' + ${companyName} + ' 版权所有'"
        >
          © 2023 OJ编程平台 版权所有
        </p>
      </div>
    </div>
  </body>
</html>
